import { createRouter, createWebHashHistory } from "vue-router";
import Enterpage from "../views/Enterpage.vue";

const routes = [
  {
    path: "/enter",
    redirect: "/enter/film/nowshow",
  },
  {
    path: "/",
    redirect: "/enter/film/nowshow",
    // redirect:"/shishi"
  },
  {
    path: "/enter",
    component: Enterpage,
  },

  // {
  //   path:'/shi1',
  //   name:shi1,
  //   component: () => import(/* webpackChunkName: "shi1" */ '../views/shi1.vue'),
  // },
  {
    path: "/enter",
    name: "enter",
    component: Enterpage,
    children: [
      {
        path: "film",
        name: "film",
        component: () =>
          import(/* webpackChunkName: "film" */ "../views/Film.vue"),
        children: [
          {
            path: "nowshow",
            name: "nowshow",
            component: () =>
              import(/* webpackChunkName: "nowshow" */ "../views/NowShow.vue"),
          },
          {
            path: "comingsoon",
            name: "comingsoon",
            component: () =>
              import(
                /* webpackChunkName: "comingsoon" */ "../views/ComingSoon.vue"
              ),
          },
        ],
      },
      {
        path: "cinemas",
        name: "cinemas",
        component: () =>
          import(/* webpackChunkName: "cinemas" */ "../views/Cinema.vue"),
      },
      {
        path: "personcenter",
        name: "personcenter",
        component: () =>
          import(
            /* webpackChunkName: "personcenter" */ "../views/PersonCenter.vue"
          ),
      },
    ],
  },
  {
    path: "/shishi",
    name: "shishi",
    component: () =>
      import(/* webpackChunkName: "shishi" */ "../views/shishi.vue"),
  },
  {
    path: "/new",
    name: "new",
    component: () => import(/* webpackChunkName: "new" */ "../views/News.vue"),
  },
  {
    path: "/city",
    name: "city",
    component: () => import(/* webpackChunkName: "city" */ "../views/City.vue"),
  },
  {
    path: "/detail",
    name: "detail",
    component: () =>
      import(/* webpackChunkName: "detail" */ "../views/FilmDetail.vue"),
  },
  {
    path: "/cinemadetail",
    name: "cinemadetail",
    component: () =>
      import(
        /* webpackChunkName: "cinemadetail" */ "../views/CinemaDetail.vue"
      ),
  },
 
  {
    path: "/XuanZuo",
    name: "XuanZuo",
    component: () =>
      import(/* webpackChunkName: "setting" */ "../views/XuanZuo.vue"),
  },
  {
    path: "/www",
    name: "www",
    component: () => import(/* webpackChunkName: "www" */ "../views/www.vue"),
  },
  {
    path: "/qqq",
    name: "qqq",
    component: () => import(/* webpackChunkName: "www" */ "../views/qqq.vue"),
  },
  {
    path: "/abc",
    name: "abc",
    component: () => import(/* webpackChunkName: "abc" */ "../views/abc.vue"),
  },
  {
    path: "/ccc",
    name: "ccc",
    component: () => import(/* webpackChunkName: "abc" */ "../views/ccc.vue"),
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
